home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 June: Reference Library / Dev.CD Jun 95 / Dev.CD Jun 95.toast / What's New? / Tool Chest / Testing & Debugging / Debuggers & dcmds / MacsBug 6.5d12 / MacsBug 6.5d12 Changes < prev    next >
Encoding:
Text File  |  1995-04-14  |  11.7 KB  |  215 lines  |  [ttro/ttxt]

  1.  About MacsBug 6.5d12
  2.    4/13/95
  3.  
  4.            HEAP SCRAMBLING
  5.        
  6.            When we move a block of data around, we can't tell if it contains executable code, so the
  7.            processor caches should have been flushed on the destination range. In the past, when
  8.            the entire cache was flushed very often, this wasn't a problem. With the cache flushing
  9.            changes in 6.5d10, heap scrambling became very much unreliable. This has been fixed.
  10.  
  11.            POWERPC EMBEDDED SYMBOLS
  12.            
  13.            We now support looking up PowerPC embedded symbols from traceback tables. If you're using the
  14.            newest Metrowerks 1.2.1 C/C++ compilers you can take advantage of this. The only other compiler
  15.            I know that currently supports traceback tables is xlc for the RS/6000. With the current
  16.            implementation, typing a symbol name will not evaluate to the address of that routine. The
  17.            traceback symbols are currently only used within a disassembly of PowerPC code.
  18.            
  19.            CFM SYMBOL LOOKUP
  20.  
  21.            When you're stepping through a fragment of PowerPC code that doesn't contain any exported
  22.            CFM symbols (a simple application comes to mind), the delay between steps has been drastically
  23.            reduced. This was done by removing a very large number of Mixed Mode switches on each line of
  24.            disassembly, as well as fixing a logic bug that caused us to exhaustively look for 68K symbols
  25.            when there couldn't possibly be any.
  26.  
  27.            WH COMMAND
  28.  
  29.            When displaying an address that is in VM file-mapped space, MacsBug now shows what CFM library
  30.            the address resides within.
  31.  
  32.            STACK CRAWL
  33.            
  34.            MacsBug now understands Mixed Mode stacks when using the "SC7" command, and will show you
  35.            the instruction set of each caller. This command now works correctly from either PowerPC
  36.            or 68K code. For this release the "SC6" command works exactly as it did in 6.5d11 due to a
  37.            last-minute problem (infinite recursion sucks). It will fully understand Mixed Mode stacks
  38.            in the next release.
  39.  
  40.            POWERPC DEBUGGING
  41.        
  42.      •When stepping up to a flow of control instruction, MacsBug displays a message which
  43.                     indicates if the branch will or will not be taken. In previous versions this was
  44.                     frequently wrong due to a sign-extension bug in the compiler, which we've worked around.
  45.                  • You can now disable PowerPC Debugger and DebugStr calls with the “DX” command.
  46.                  • The “TF” (Total Floating Point display) command now works when in PowerPC code, and will
  47.                      show the entire PowerPC native FPU register set. You can now use “FPR0” through “FPR31”
  48.                      in expressions, although this is totally useless since MacsBug's expression evaluation
  49.                      is centered around 32-bit values, and FPRs are 64-bit.
  50.                  • When displaying the PowerPC register set via “TD”, we now know about the 603e, and display
  51.                      a reasonable message for future processors.
  52.                  • When debugging PowerPC code at boot time, we no longer display the name of the currently
  53.                      loading extension after each and every step or trace. My, that was annoying.
  54.  
  55.            There are a few problems with native debugging that you should be aware of. They are:
  56.            
  57.            • If you're stopped on a native breakpoint, you currently can't Go, you need to Step once
  58.                     and then Go.
  59.                  • As above, if you're sitting at a branch to subroutine instruction that has a breakpoint
  60.                      located at it, you cannot Step Over the subroutine call without first removing the
  61.                      breakpoint.
  62.                  • If you use the single-machine Macintosh Debugger, or the Metrowerks Debugger which
  63.                     require the PowerMac Debug Services background application, you shouldn't place the
  64.                     app in the Startup Items folder. The app has a feature such that if it can't
  65.                     communicate with a host debugger, it will DebugStr into 68K code when it sees a
  66.                     native exception (breakpoint, trace, etc.). MacsBug will not get a chance to handle
  67.                     any native exceptions. If you do use a high-level debugger in cooperation with
  68.                     MacsBug, you should place the background application in the same folder as your
  69.                     debugger so it gets launched when you start up the debugger.
  70.  
  71.            RB AND RS
  72.  
  73.            These commands no longer reboot if there are extra parameters on the command line. The 
  74.            motivation here is that Dave recently typed “rb -s” when he meant to type “rd -s”, and
  75.            he really, really didn't mean to reboot his system at that particular time.
  76.  
  77.            DCMD COMMAND
  78.        
  79.            We've added a new command which displays a compact list of all installed dcmds. This list
  80.            includes the dcmd name and syntax, as well as the version if the dcmd is format 3 or later.
  81.            The command can accept a optional prefix string to limit the display to a subset of all dcmds.
  82.  
  83.            RD DCMD
  84.            
  85.            We've added a new option, “-h” which will show information on a resource given its handle.
  86.            Very, very useful. When looking up resources by type, the “-t” option is now optional, so
  87.            you can now type something like “RD 'STR '”.
  88.  
  89.            GESTALT DCMD
  90.            
  91.            A number of new selectors were added to the list of those that are recognized.
  92.  
  93.            THING DCMD
  94.            
  95.            The Thing dcmd is now a part of the standard MacsBug distribution. This dcmd displays
  96.            information on Components.
  97.            
  98.            JUMPTABLE DCMD
  99.     
  100.            Fixed a stack imbalance problem that would cause MacsBug to exit when the dcmd was done
  101.            executing. Why this had that sort of behavior and didn't crash is extremely odd.
  102.            
  103.            EXPRESSION EVALUATION
  104.  
  105.            In the past there was no way to use the name of a trap in an expression and have it evaluate
  106.            to the trap's number. Using the syntax “††<trapname>” now provides for this. For example, if
  107.            you want to see what selector $18 off of trap HFSDispatch is, but you don't know the trap
  108.            number, this expression will do the trick:
  109.            
  110.                 dh 7018 ††HFSDispatch
  111.                 
  112.            Of course, in this example you had to know that 7018 was MOVEQ #$18, D0 (everyone does, right?).
  113.            
  114.            With the addition of ROM map and Code Fragment Manager symbols in recent releases, the potential
  115.            for confusion about exactly what symbol will be found if a name collision occurs has increased.
  116.            If you know that a symbol you're trying to look up is ROM map-based, you've been able to prefix
  117.            the symbol with the Option-R ('®') character. Now you can do a similar lookup order force for CFM.
  118.            If your symbol string is prefixed with Option-G ('©'), it will be searched for first in the CFM
  119.            name space. Since Option-G looks reasonable when displayed ('C' == CFM), but is a pain to remember,
  120.            Option-C now maps to Option-G (try it, they're identical as far as MacsBug is concerned).
  121.            
  122.            We've added a really cool new feature we call “explain significance of”. During simple expression
  123.            evaluation, we now show the magnitude of the resultant value in more human intelligible terms. In
  124.            our daily trials debugging the System Software, we're quite often surprised at how many people can't
  125.            look at a hex value and realize, “Oh, that's past the end of your logical RAM - that's why you died”.
  126.            With this feature we hope for a greater awareness of the general magnitude of things. For example,
  127.            typing the value $120C60 yields:
  128.            
  129.                 120C60 = $00120C60  #1182816  #1182816 '••`' (between 1M and 2M)
  130.                 
  131.            For values that contain lots of trailing zeros, you'll get to see a new notation we've developed
  132.            for more easily describing a 32-bit value. So that you don't have to call out each individual
  133.            trailing zero (and look silly counting along on your fingers as you talk to your co-workers), we've
  134.            developed the “kabillion” short-hand notation. For values that contain at least 5 trailing (least-
  135.            significant) zeros, the notation will be used. For example, for $40800000, you get:
  136.            
  137.                 40800000 = $40800000 #1082130432  #1082130432  '@A••'
  138.                 (just over 1G; 4 0 8 kabillion)
  139.             
  140.            This is read “four-zero-eight kabillion” or “four-oh-eight kabillion”. Cool, huh?
  141.  
  142.            You can now use the Option-/ character ('÷') as an alias for '/' (division).
  143.            
  144.            MACROS
  145.            
  146.            Macros can now optionally take parameters. When processing a macro expansion, positional
  147.      parameters ®1 through ®9 (Option-R) represent the remaining whitespace-delimited tokens on the 
  148.      command line after the macro name. The parser understands the number of parameters your macro 
  149.      requires by noticing the highest-numbered parameter. If you use®9 as a single parameter, you must 
  150.      have eight preceding parameters, which are ignored. These parameters can be quoted with single or
  151.            double quotes, the quotes are not part of the parameter value. For example, the following
  152.            macro takes a single parameter, a resource type. You would invoke this macro with a command
  153.            line such as “gres 'gpch'”.
  154.            
  155.                    "gres", "atb GetResource (sp+2)^='®1'"
  156.  
  157.            A sample parameterized macro is provided within MacsBug which will break on all 68K calls to
  158.            GetResource, Get1Resource, and Get1xResource for a given type. This macro is named “RType”
  159.            and is invoked as in the example above.
  160.  
  161.            When displaying macros with the “MCD” command, and the macro expansion needed two or more
  162.            lines to be fully displayed, the text really should have wrapped instead of disappearing into
  163.            the bit-bucket off the right side of the screen. Therefore, we now wrap the text appropriately.
  164.            If you terminate this command before it finishes, you'll now get control back a lot faster.
  165.  
  166.            Since the evaluation of trap numbers in expressions has changed, if you want to find the 
  167.            trap name given a number but don't want to have to type “WH ††Axyz”, we've added a simple macro.
  168.            The macro “WHT” shows the name and implementation address of a trap given a trap name or number.
  169.  
  170.            TEMPLATES
  171.            
  172.            An extremely popular bug in template display has been fixed. When showing a region of memory
  173.            with a template that contained a pointer field, and that field was filled was a garbage bus-
  174.            error value, we'd quit showing the template when we reached that field. For example, doing
  175.            “dm a0 iopb” with an ioNamePtr field pointing off into unmapped space no longer terminates
  176.            the template display.
  177.  
  178.            MODERN MEMORY MANAGER HEAP STUFF
  179.             
  180.            When identifying whether a heap is the Process Manager heap, we now only do this if the
  181.            Process Manager is around (ie. it's after boot time).
  182.  
  183.            DISASSEMBLY
  184.            
  185.            When displaying the offset into a procedure, we now show 5 nibbles for the offset instead of 4.
  186.  
  187.            MISCELLANEOUS
  188.            
  189.            If you've invoked a command that displays a lot of output, and tire of having to press Return
  190.            or Space to display another page, you can now temporarily turn off these prompts. Using Command-
  191.            Return or Command-Space at the prompt skips the remaining prompts this command would have
  192.      generated. You can still abort the command by pressing any key, you just won't be asked about it a 
  193.      bunch of times. When the command terminates, the prompts will be re-enabled for the next command 
  194.      (unless you've used SET SCROLLPROMPT OFF to globally disable the feature).
  195.  
  196.            When we switch instruction set displays, we should now properly clean up all extra pixels in
  197.            the register subdisplay.
  198.  
  199.            When you execute a command with too many parameters, MacsBug now displays a much more useful
  200.            message, as well as actually showing you what parameters weren't needed.
  201.  
  202.            Command-G, -S, and -T now only work if the command line is empty.
  203.  
  204.            The TestDcmd application will now load format 3 dcmds, but doesn't do anything special to support
  205.            them.
  206.  
  207.            The PlayMem general-purpose buffer is now always 4-byte aligned.
  208.  
  209.            BUILT-IN DEBUGGER PREFS
  210.     
  211.            We've added templates for the various SCSI Manager 4.3 API parameter blocks.
  212.  
  213.  
  214. ©1995 Apple Computer, Inc.
  215.